import request from '@/utils/request'

export function addPosition(data) {
  return request({
    url: '/juanbusiness/org-position/add',
    method: 'post',
    data
  })
}

export function findPosition(page,size,name) {
  return request({
    url: '/juanbusiness/org-position/findPage',
    method: 'get',
    params: {page: page,size: size,name: name}
  })
}

  export function detailPosition(id) {
    return request({
      url: '/juanbusiness/org-position/get',
      method: 'get',
      params: {id: id}
    })
  }

export function enablePosition(data) {
  return request({
    url: '/juanbusiness/org-position/enable',
    method: 'put',
    data
  })
}

export function editPosition(data) {
  return request({
    url: '/juanbusiness/org-position/edit',
    method: 'put',
    data
  })
}

export function delPosition(id) {
  return request({
    url: '/juanbusiness/org-position/del',
    method: 'delete',
    params: {id: id}
  })
}
